pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    [0, 1]
        .into_iter()
        .chain(std::iter::repeat(()).scan([0, 1], |[a, b], ()| {
            let next = *a + *b;
            *a = *b;
            *b = next;
            (next <= threshold).then_some(next)
        }))
        .filter(|&x| x % 2 != 0)
        .sum()
}
